package com.tentative.competition.common.utils;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import org.springframework.stereotype.Component;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * @auther: Smile Huang
 * @date: 2023/6/22 22:23
 * @desc: 数据转换
 * @version: 2.0
 */
@Component
public class DataConversionUtils {

    public List<String> strToList(String str){
        if (StrUtil.isBlank(str)){
            return CollUtil.newArrayList();
        }
        return Arrays.asList(StringUtils.split(str,","));
    }

}
